// 统一管理项目用户相关的接口
import request from '@/utils/request'

// 项目用户相关的请求地址
enum API {
  PREDICT_URL = '/predict/forecast',
  HOUSE_LIST_URL = '/predict/house_list',
  HOUSE_INFO_URL = '/predict/house_info',
}

// 预测价格
export const reqPredictAPI = (data: any) =>
  request.post<any, any>(API.PREDICT_URL, data)
// 房源列表
export const reqHouseListAPI = (params: {
  page: number
  keywords: string
  city: string
  plot: string
}) => request.get<any, any>(API.HOUSE_LIST_URL, { params })
// 房源详情
export const reqHouseDetailAPI = (house_id: number) =>
  request.get<any, any>(API.HOUSE_INFO_URL, { params: { house_id } })
